<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<!-- <title>新增收货地址</title> -->
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
		<meta name="format-detection" content="telephone=no" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=0, minimum-scale=1.0,  maximum-scale=1.0" />
		<meta name="format-detection" content="telephone=no" />
		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black" />
		<meta content="black" name="apple-mobile-web-app-status-bar-style" />
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/shop/css/public.css" />
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/shop/css/reset.css"/>

</head>
<body style="height:auto;background: #e5e5e5;">
	<div id="form1" style="display:none;"></div>
				<div class="top1">
			<div class="top2">
				 <a href="Javascript:history.go(-1)"><span class="top3">返回</span></a>

			</div>
					<c:if test="${address.id!=null}">
						<div class="top4">修改地址</div>
					</c:if>
					<c:if test="${!(address.id != null)}">
						<div class="top4" >新增地址</div>
					</c:if>
		</div>
		<div class="div_w"></div>
	<form action="${ctx}/shop/indexListSave" modelAttribute="address" id="AddressForm" method="post">
		<div style="height:40px;width:100%;background: #ffffff;border-top: 1.5px solid #e5e5e5;"class="clearfix">

			<c:if test="${address.id!=null}">
                <span style="float:left; margin-left: 3%;margin-top:3%">用户名称：</span>
				<input id="receiver" name="name" readonly style="width:60% ;height: 100%;border:none" value="${address.user.name}"/>
                <input type="hidden" name="id"  value="${addressID}"/>
			</c:if>
			<c:if test="${!(address.id != null)}">
			    <input id="receiver" name="name" style="width:60% ;height: 100%;border:none" readonly value="${user.name}"/>
                <input type="hidden" name="id"  value="${addressID}"/>
			</c:if>
		</div>
		<div style="height:40px;width:100%;background: #ffffff;border-top: 1.5px solid #e5e5e5;"class="clearfix">

			<c:if test="${address.id!=null}">
                <span style="float:left; margin-left: 3%;margin-top:3%">电话：</span>
				<input id="phone" name="phone" style="width:60% ;height: 100%;border:none"placeholder="${address.phone}"/>
			</c:if>
			<c:if test="${!(address.id != null)}">
				<input id="phone" name="phone" style="width:60% ;height: 100%;border:none"placeholder="电话"/>
			</c:if>
		</div>
		<div style="height:40px;width:100%;background: #ffffff;border-top: 1.5px solid #e5e5e5;"class="clearfix">


			<c:if test="${address.id!=null}">
                <span style="float:left; margin-left: 3%;margin-top:3%">地址：</span>
				<input id="phone" name="address" style="width:60% ;height: 100%;border:none" placeholder="${address.address}" value="${address.address}"/>
			</c:if>
			<c:if test="${!(address.id != null)}">
				<input id="phone" name="address" style="width:60% ;height: 100%;border:none" placeholder="地址"/>
 			</c:if>
		</div>
		<div style="height:80px;width:100%;background: #ffffff;border-top: 1.5px solid #e5e5e5;"class="clearfix">

			<c:if test="${address.id!=null}">
                <span style="float:left; margin-left: 3%;margin-top:3%">备注：</span>
			    <input id="addressInfo" name="remarks" value="${address.remarks}" style="width:95% ;height: 30%;margin-left: 3%;border:none " placeholder="${address.remarks}"/>
			</c:if>
			<c:if test="${!(address.id != null)}">
				<input id="phone" name="remarks" style="width:60% ;height: 30%;border:none" placeholder="备注"/>
			</c:if>

		</div>
		<div style="height:40px;width:100%;"class="clearfix">
			<input type="radio" value="1" name="isDefault" id="isDefault" style="float:left; margin-left: 3%;margin-top:3%">
            <a href="${ctx}/shop/indexListDef?id=${addressID}"><span style="float:left;margin-top:2%">设为默认地址</span></a>
		</div>
		<c:if test="${address.id!=null}">
		<div style="height:40px;width:100%;background: #ffffff;border-top: 1.5px solid #e5e5e5;"class="clearfix">
			<%--<a onclick="addC(2)" id="addc">--%>
					<%--<a href="${ctx}/shop/indexListSave?addressId=${addressID}">--%>
                    <input style="height: 25px;width: 150px;font-size:22px;float:left;margin-left: 25%;margin-top: 1.5%;color: red"   type="submit" value="保存收货地址"><br>
		</div>
			<div style="height:40px;width:100%;background: #ffffff;border-top: 1.5px solid #e5e5e5;"class="clearfix">
					<%--<a onclick="addC(2)" id="addc">--%>
				<a href="${ctx}/shop/indexListDelete?addressId=${address.id}"><span style="color: red;font-size:25px;float:left;margin-left: 25%;margin-top: 3%">删除收货地址</span></a>
					<%--<a href="${ctx}/shop/indexListUpdate?addressId=${address.id}"><span style="color: red;font-size:25px;float:left;margin-left: 25%;margin-top: 3%">确认收货地址</span></a>--%>
					<%--</a>--%>
			</div>
		</c:if>
		<c:if test="${!(address.id != null)}">
			<div style="height:40px;width:100%;background: #ffffff;border-top: 1.5px solid #e5e5e5;"class="clearfix">
                    <%--<a href="${ctx}/shop/indexListUpdate?addressId=${address.id}"><span style="color: red;font-size:25px;float:left;margin-left: 25%;margin-top: 3%">确认收货地址</span></a>--%>
                <input style="height: 25px;width: 150px;font-size:22px;float:left;margin-left: 25%;margin-top: 1.5%;color: red" type="submit" value="确认收货地址">

			<%--</a>--%>
			</div>
		</c:if>






    </form>
		<script src="${ctxStatic}/shop/js/jquery-1.6.2.min.js "></script>
		<script type="text/javascript">

		</script>
</body>
</html>